 
<?php
echo $this->adminToolBar('excursion', 'add', '/admin/rates/add/', '/admin/rates/updaterates/', '/admin/rates/delete/','/admin/excursion/');
?>


    <table border="1" width="100%" cellpadding="1" cellspacing="2">
	<form name="exform" id="exform" action="/admin/excursion/doedit/">
        <tr>
		<td width="15%">Excursion day desc</td>
		<td width="85%"><input type="text" name="daydesc" id="daydesc" value="" class="input-2" /></td>
	</tr>
        <tr>
		<td width="15%">Excursion day desc (ru)</td>
		<td width="85%"><input type="text" name="daydesc_ru" id="daydesc_ru" value="" class="input-2" /></td>
	</tr>
        <tr>
		<td width="15%">Excursion city desc</td>
		<td width="85%"><?php echo $this->EditorFck('citydesc'); ?></td>
	</tr>
        <tr>
		<td width="15%">Excursion city desc (ru)</td>
		<td width="85%"><?php echo $this->EditorFck('citydesc_ru'); ?></td>
	</tr>
        
        <tr>
		<td width="15%">Active</td>
		<td width="85%"><input  type="checkbox" name="active" id="active" value="<?php echo $this->excursion_arr['active']; ?>" class="input-2" /></td>
	</tr>
        </form>
    </table>
<script type="text/javascript">
function saveexcursion()
{
       var daydesc=$('#daydesc');
       var daydesc_ru=$('#daydesc_ru');
       var citydesc = FCKeditorAPI.GetInstance("citydesc").EditorWindow.parent.FCK.GetHTML();
       var citydesc_ru = FCKeditorAPI.GetInstance("citydesc_ru").EditorWindow.parent.FCK.GetHTML();
        if($('#active').attr('checked')==true)
            {
                active=1;

            }
            else{
                active=0;
            }
		$.ajax({
			type: "POST",
			url: '/admin/excursion/doadd/',
			data: ({daydesc:daydesc.val(), citydesc: citydesc, daydesc_ru: daydesc_ru.val(),citydesc_ru:citydesc_ru, active:active}),
	    	        success: function(data, textStatus, XMLHttpRequest){
	    	   	if(data != '') {
                               alert(data);
                             //  alert("successfully Added the   features");
	    			loadPage('/admin/excursion/');
	    	   	}
	    	},
	    	complete: function complete(XMLHttpRequest, textStatus){
	         //   $("#loader_area").hide();
	        }
		});

}


function deletestructurefield(id,rateid,hotelid)
{
		$.ajax({
			type: "POST",
			url: '/admin/rates/deletestructuredata/',
			data: ({id:id}),
	    	        success: function(data, textStatus, XMLHttpRequest){
	    	   	if(data != '') {
                               alert(data);
                             //  alert("successfully Added the   features");
	    			loadPage('/admin/rates/ratefeatures/rate_id/'+rateid+'/hotelid/'+hotelid);
	    	   	}
	    	},
	    	complete: function complete(XMLHttpRequest, textStatus){
	            $("#loader_area").hide();
	        }
		});

}

</script>


